Skip to content

Conversation

GigiHB
Copy link
Contributor

@GigiHB GigiHB commented Apr 9, 2025

A ver si ahora sí asuuu

@@ -0,0 +1,30 @@
S C:\Users\gisel\desktop\challenge_1> git add challenge1.py

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

elimine este archivo

ch1.py Outdated

#los primeros 10 items

import feedparser

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

los imports siempre van al principio del archivo, nunca al final

ch1.py Outdated
print(f"Link: {link}")

#Guardar un archivo JSON
import json

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

los imports siempre van al principio del archivo, nunca al final

ch1.py Outdated
Comment on lines 7 to 11
if r.status_code == 200:
xml_content = r.text
print(xml_content)
else:
print("error")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aquí no ocupa imprimir el contenido de la pagina si está checando el status code.

Suggested change
if r.status_code == 200:
xml_content = r.text
print(xml_content)
else:
print("error")
if r.status_code != 200:
print(f"error with status code {r.status_code}")

@tony-gomez
Copy link

Muy bien 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants